<?php

namespace houniao\api\v1;

use houniao\Request;

class Order extends Request
{

    //订单渲染(多个商品渲染) check_goods_order_batch
    public function checkGoodsOrderBatch(array $data=[]){
        $this->type='POST';
        $this->path='/order/check_goods_order_batch';

        $this->data= array_merge($this->data,$data);
        return $this->exec();
    }

    //创建订单
    public function createOrder(array $data=[]){
        $this->type='POST';
        $this->path='/order/buynow';

        $this->data= array_merge($this->data,$data);
        return $this->exec();
    }

    //查询余额
    public function userMoney(array $data=[]){
        $this->type='POST';
        $this->path='/order/users_money';

        $this->data= array_merge($this->data,$data);
        return $this->exec();
    }

    //获取运费
    public function freight(array $data=[]){
        $this->type='POST';
        $this->path='/order/get_freight';

        $this->data= array_merge($this->data,$data);
        return $this->exec();
    }

    //订单详情
    public function info(array $data=[]){
        $this->type='POST';
        $this->path='/order/get_info';

        $this->data= array_merge($this->data,$data);
        return $this->exec();
    }

    //订单详情--根据来源单号
    public function get_source_order(array $data=[]){
        $this->type='POST';
        $this->path='/order/get_source_order';

        $this->data= array_merge($this->data,$data);
        return $this->exec();
    }

    //取消订单
    public function cancel(array $data=[]){
        $this->type='POST';
        $this->path='/order/cancel';

        $this->data= array_merge($this->data,$data);
        return $this->exec();
    }

    //售后申请
    public function after_sale_apply(array $data=[]){
        $this->type='POST';
        $this->path='/after_sale/apply';

        $this->data= array_merge($this->data,$data);
        return $this->exec();
    }

    public function after_sale_detail(array $data=[]){
        $this->type='POST';
        $this->path='/after_sale/detail';

        $this->data= array_merge($this->data,$data);
        return $this->exec();
    }

    //物流轨迹
    public function logistics(array $data=[]){
        $this->type='POST';
        $this->path='/order/query_logistics_track';

        $this->data= array_merge($this->data,$data);
        return $this->exec();
    }

}